/*
 * Copyright 2008-2023 dexian.vip. All rights reserved.
 * Support: http://www.dexian.vip
 * License: http://www.dexian.vip/license
 */

package vip.dexian.admin.assembler;

import vip.dexian.admin.dto.AdminPrincipal;
import vip.dexian.admin.entity.Admin;
import org.mapstruct.Builder;
import org.mapstruct.Mapper;

/**
 * Admin to principal
 *
 * @author 挺好的 2023年06月05日 15:49
 */
@Mapper (componentModel = "spring", builder = @Builder (disableBuilder = true))
public interface AdminToPrincipalAssembler {

    /**
     * 管理员对象转换为 管理员登录凭证
     *
     * @param admin
     *         管理员
     *
     * @return
     */
    AdminPrincipal toPrincipal (Admin admin);
}
